/* ===== BASE STYLES ===== */
:root {
  --header-bg-start: #3f51b5; /* Deeper blue for gradient start */
  --header-bg-end: #673ab7;   /* Purple for gradient end */
  --header-text-color: #ffffff;
  --footer-bg-color: #2c3e50; /* Dark blue-grey from image */
  --footer-text-color: #cccccc;
  --footer-link-color: #eeeeee;
  --body-bg-start: #3b819f; /* Original body gradient start */
  --body-bg-end: #c0d1d8;   /* Original body gradient end */
  --container-bg: #1f1f2e; /* Original container background */
  --container-shadow: rgba(0, 0, 0, 0.5); /* Original container shadow */
  --primary-button-color: #00f9ff; /* Original button color */
  --primary-button-text: #1f1f2e; /* Original button text color */
  --secondary-button-hover: #00d4e4;
  --outline-button-border: #00f9ff;
  --outline-button-hover-bg: rgba(0, 249, 255, 0.1);
  --drop-area-border: #00f9ff;
  --drop-area-bg: rgba(255, 255, 255, 0.05);
  --drop-area-hover-bg: rgba(0, 249, 255, 0.1);
  --section-bg: #ffffff;
  --section-shadow: rgba(0, 0, 0, 0.08);
  --section-h-color: #1c3d5a;
  --section-text-color: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, var(--body-bg-start), var(--body-bg-end));
  color: white; /* Default text color for body, sections override */
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* Stack header, main, footer vertically */
}

/* Header Styles */
.main-header {
  background: linear-gradient(135deg, var(--header-bg-start), var(--header-bg-end)); /* Reverted to consistent header gradient */
  padding: 15px 30px;
  color: var(--header-text-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px; /* Max width for content */
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
}

.header-logo {
  width: 40px; /* Adjust size as needed */
  height: 40px;
  margin-right: 10px;
  border-radius: 8px; /* Added border-radius for consistency */
  background: rgba(255, 255, 255, 0.918); /* Background for the image */
  padding: 2px; /* Small padding if needed */
}

.site-title {
  font-size: 24px;
  font-weight: bold;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 25px; /* Space between nav items */
}

.main-nav ul li a {
  color: var(--header-text-color);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.main-nav ul li a:hover {
  opacity: 0.8;
}

.hamburger-menu {
  display: none; /* Hidden by default on large screens */
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--header-text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none; /* Hidden by default */
  background: var(--header-bg-end);
  width: 100%;
  position: absolute;
  top: 70px; /* Height of header + padding */
  left: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
}

.mobile-nav.active {
  display: block;
  transform: translateY(0);
}

.mobile-nav ul {
  list-style: none;
  padding: 10px 0;
  text-align: center;
}

.mobile-nav ul li {
  padding: 12px 20px;
}

.mobile-nav ul li a {
  color: var(--header-text-color);
  text-decoration: none;
  font-size: 18px;
  display: block;
}

.mobile-nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

/* Hamburger animation */
.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Main Content Wrapper (to center content and sections) */
.content-wrapper {
  flex-grow: 1; /* Allows content to take available space */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the container and sections horizontally */
  padding: 20px; /* Add some overall padding */
  box-sizing: border-box; /* Ensures padding doesn't cause overflow */
  width: 100%; /* Ensure it spans full width */
}


/* Converter Container Styles */
.container {
  background: var(--container-bg);
  padding: 30px;
  border-radius: 15px;
  max-width: 900px; /* Adjust max-width if needed */
  width: 100%;
  box-shadow: 0 0 30px var(--container-shadow);
  text-align: center;
  margin-top: 20px; /* Space below header, consistent */
  margin-bottom: 20px; /* Space before sections */
}

/* Section headings */
.container h1 { /* Targeting h1 specific to this container */
  margin-bottom: 20px;
  font-size: 24px;
  color: var(--primary-button-color); /* Matches the button color */
  display: flex; /* For icon and text alignment */
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* Allow title to wrap on small screens */
}

/* Icon styling next to headings */
.icon-small {
  width: 50px;
  height: 50px;
  vertical-align: middle;
  margin-right: 16px;
  flex-shrink: 0; /* Prevents icon from shrinking */
}

/* Button container */
.top-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* Base button styles */
.btn, .btn-outline {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

/* Primary button */
.btn {
  background-color: var(--primary-button-color);
  color: var(--primary-button-text);
  border: none;
}

.btn:hover {
  background-color: var(--secondary-button-hover);
}

/* Outline button */
.btn-outline {
  background: transparent;
  color: var(--outline-button-border);
  border: 2px solid var(--outline-button-border);
}

.btn-outline:hover {
  background-color: var(--outline-button-hover-bg);
}

/* File drop area */
.drop-area {
  border: 2px dashed var(--drop-area-border);
  padding: 40px 20px;
  border-radius: 10px;
  background-color: var(--drop-area-bg);
  cursor: pointer;
  margin-bottom: 20px;
}

.drop-area:hover {
  background-color: var(--drop-area-hover-bg);
}

.drop-area span {
  color: var(--drop-area-border);
  text-decoration: underline;
}

/* Hidden file input */
input[type="file"] {
  display: none;
}

/* Print preview section */
.print-preview {
  background: white;
  color: black;
  padding: 20px;
  display: none;
  overflow-x: auto;
}

/* Print-specific styles */
@media print {
  body * {
    visibility: hidden;
  }
  .print-preview, .print-preview * {
    visibility: visible;
  }
  .print-preview {
    position: absolute;
    top: 0;
    left: 0;
  }
}

/* Section Styles */
section {
  background-color: var(--section-bg);
  margin: 20px auto; /* Adjusted margin for consistency */
  padding: 25px;
  max-width: 850px; /* Consistent max width */
  width: 100%; /* Ensure it takes full width of content-wrapper */
  border-radius: 10px;
  box-shadow: 0 0 15px var(--section-shadow);
}

section h1 { /* Targeting the main h1 in sections */
  font-size: 28px; /* Larger size for main section heading */
  color: var(--section-h-color); /* Dark blue for section titles */
  margin-bottom: 20px;
  text-align: left; /* Keep left aligned */
}

section h2, section h3 {
  font-family: 'Segoe UI', sans-serif; /* Consistent font */
  color: var(--section-h-color);
  font-size: 26px; /* H2 size */
  margin-top: 20px; /* Space between sections */
  margin-bottom: 12px;
  text-align: left; /* Keep left aligned */
}

section h3 {
  font-size: 22px; /* H3 size */
}

section p, section li {
  font-family: 'Segoe UI', sans-serif; /* Consistent font */
  color: var(--section-text-color);
  font-size: 17px;
  line-height: 1.7;
  text-align: justify;
}

section ul, section ol {
  padding-left: 22px;
}


/* Footer Styles */
.main-footer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  padding: 40px 20px 20px;
  margin-top: auto; /* Pushes footer to the bottom */
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
  padding: 10px;
  text-align: left; /* Default left align */
}

.footer-logo-section {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.footer-logo {
  width: 50px; /* Adjust size */
  height: 50px;
  margin-right: 10px;
  border-radius: 0.5rem; /* Match general footer styling */
  background: #fefeff; /* White background for favicon */
  padding: 2px;
}

.footer-site-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--footer-link-color);
}

.footer-section h3 {
  color: var(--footer-link-color);
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-section h4 { /* For Popular Tools, Categories, Company */
  color: var(--footer-link-color);
  font-size: 18px;
  font-weight: 600; /* Adjusted for better appearance */
  margin-bottom: 15px;
}

.footer-section p {
  font-size: 15px;
  line-height: 1.6;
  text-align: left; /* Adjust text alignment for footer description */
  margin-bottom: 0; /* Remove default paragraph margin */
  color: var(--footer-text-color); /* Ensure text color is consistent */
}

.footer-section ul {
  list-style: none;
  padding: 0; /* Remove default padding */
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--footer-text-color);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--footer-link-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 14px;
  color: var(--footer-text-color);
}


/* Sticky chat icon contact styles */
.sticky-chat-icon {
  display: inline-block;
  text-decoration: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  cursor: pointer;
}

.sticky-chat-icon > div:first-child { /* The inner circle */
  width: 50px;
  height: 50px;
  background-color: #8800f8;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.sticky-chat-icon svg { /* The SVG icon */
  width: 25px;
  height: 25px;
  fill: white; /* Ensure SVG is white */
}

.sticky-chat-icon > div:last-child { /* The wave effect */
  position: absolute;
  width: 80px;
  height: 80px;
  background: #8800f8;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.4;
  animation: wave 2s infinite linear;
}

@keyframes wave {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.4;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .main-header {
    padding: 10px 20px;
  }

  .main-nav {
    display: none; /* Hide desktop nav */
  }

  .hamburger-menu {
    display: flex; /* Show hamburger */
  }

  .site-title {
    font-size: 20px;
  }

  .header-logo {
    width: 70px;
    height: 70px;
  }

  .container {
    padding: 20px;
    margin: 20px auto; /* Adjust margin for smaller screens */
  }

  .container h1 { /* Targeting h1 specific to this container */
    font-size: 22px;
  }

  .icon-small {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  .top-buttons {
    flex-direction: column; /* Stack buttons vertically */
  }
  .btn, .btn-outline {
    width: 100%; /* Make buttons full width */
  }

  /* Footer responsiveness */
  .footer-content {
    grid-template-columns: 1fr; /* Stack columns */
    text-align: center; /* Center align text */
  }

  .footer-section {
    padding: 15px 0;
  }

  .footer-logo-section {
    justify-content: center; /* Center logo in footer */
  }

  .footer-section p, .footer-section ul {
    text-align: center; /* Center text/list in footer sections */
  }
  .footer-section ul {
    align-items: center; /* Center list items */
  }

  /* Sticky chat icon responsive adjustments */
  .sticky-chat-icon {
    bottom: 20px !important;
    right: 20px !important;
  }

  .sticky-chat-icon > div:first-child {
    width: 45px !important;
    height: 45px !important;
  }

  .sticky-chat-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  .sticky-chat-icon > div:last-child {
    width: 65px !important;
    height: 65px !important;
  }

  /* Section adjustments */
  section {
    padding: 20px;
  }
  section h1, section h2, section h3 {
    font-size: 20px; /* Smaller headings */
    text-align: center; /* Center section headings on mobile */
  }
  section h3 {
    font-size: 18px;
  }
  section p, section li {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .container h1 {
    font-size: 18px;
  }

  .icon-small {
    width: 35px;
    height: 35px;
  }

  .btn, .btn-outline {
    font-size: 14px;
    padding: 8px 15px;
  }

  .drop-area p {
    font-size: 15px;
  }

  section h1, section h2, section h3 {
    font-size: 18px;
  }
  section h3 {
    font-size: 16px;
  }
  section p, section li {
    font-size: 14px;
  }
}

/* Remove unused/conflicting styles */
/* The original CSS had styles like .main-container, .gradient-bg, .header-container, etc.
   These have been replaced or integrated into the new .main-header and .content-wrapper structure.
   The animation classes (animate-fade-in, animate-slide-up, animate-scale-in) and scrollbar
   styles are kept as they are general utility and not specific to the old header/footer.
   The .marquee and .blinking-stars were not present in the HTML, so they are commented out
   or removed if they are truly not used.
*/

/* Keeping general utility styles if they are used elsewhere or could be in the future */
/*
.animate-fade-in { animation: fadeIn 0.6s ease-in-out; }
.animate-slide-up { animation: slideUp 0.6s ease-out; }
.animate-scale-in { animation: scaleIn 0.3s ease-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #64748b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
*/